# Create a typed stub file for a large, commonly used subset of the PyBullet API.
# The signatures are derived from the Quickstart Guide tables and common usage.
# Any APIs not covered by the guide remain variadic to avoid mis-specification.




# from __future__ import annotations
from typing import Any,List, Optional, Sequence, Tuple, overload
from typing import Any, overload
# ----------------------------
# Constants (declared as int)
# ----------------------------
ACTIVATION_STATE_DISABLE_SLEEPING: int
ACTIVATION_STATE_DISABLE_WAKEUP: int
ACTIVATION_STATE_ENABLE_SLEEPING: int
ACTIVATION_STATE_ENABLE_WAKEUP: int
ACTIVATION_STATE_SLEEP: int
ACTIVATION_STATE_WAKE_UP: int
AddFileIOAction: int
B3G_ALT: int
B3G_BACKSPACE: int
B3G_CONTROL: int
B3G_DELETE: int
B3G_DOWN_ARROW: int
B3G_END: int
B3G_F1: int
B3G_F10: int
B3G_F11: int
B3G_F12: int
B3G_F13: int
B3G_F14: int
B3G_F15: int
B3G_F2: int
B3G_F3: int
B3G_F4: int
B3G_F5: int
B3G_F6: int
B3G_F7: int
B3G_F8: int
B3G_F9: int
B3G_HOME: int
B3G_INSERT: int
B3G_LEFT_ARROW: int
B3G_PAGE_DOWN: int
B3G_PAGE_UP: int
B3G_RETURN: int
B3G_RIGHT_ARROW: int
B3G_SHIFT: int
B3G_SPACE: int
B3G_UP_ARROW: int
CNSFileIO: int
CONSTRAINT_SOLVER_LCP_DANTZIG: int
CONSTRAINT_SOLVER_LCP_PGS: int
CONSTRAINT_SOLVER_LCP_SI: int
CONTACT_RECOMPUTE_CLOSEST: int
CONTACT_REPORT_EXISTING: int
COV_ENABLE_DEPTH_BUFFER_PREVIEW: int
COV_ENABLE_GUI: int
COV_ENABLE_KEYBOARD_SHORTCUTS: int
COV_ENABLE_MOUSE_PICKING: int
COV_ENABLE_PLANAR_REFLECTION: int
COV_ENABLE_RENDERING: int
COV_ENABLE_RGB_BUFFER_PREVIEW: int
COV_ENABLE_SEGMENTATION_MARK_PREVIEW: int
COV_ENABLE_SHADOWS: int
COV_ENABLE_SINGLE_STEP_RENDERING: int
COV_ENABLE_TINY_RENDERER: int
COV_ENABLE_VR_PICKING: int
COV_ENABLE_VR_RENDER_CONTROLLERS: int
COV_ENABLE_VR_TELEPORTING: int
COV_ENABLE_WIREFRAME: int
COV_ENABLE_Y_AXIS_UP: int
DIRECT: int
ER_BULLET_HARDWARE_OPENGL: int
ER_NO_SEGMENTATION_MASK: int
ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX: int
ER_TINY_RENDERER: int
ER_USE_PROJECTIVE_TEXTURE: int
GEOM_BOX: int
GEOM_CAPSULE: int
GEOM_CONCAVE_INTERNAL_EDGE: int
GEOM_CYLINDER: int
GEOM_FORCE_CONCAVE_TRIMESH: int
GEOM_HEIGHTFIELD: int
GEOM_MESH: int
GEOM_PLANE: int
GEOM_SPHERE: int
GRAPHICS_CLIENT: int
GRAPHICS_SERVER: int
GRAPHICS_SERVER_MAIN_THREAD: int
GRAPHICS_SERVER_TCP: int
GUI: int
GUI_MAIN_THREAD: int
GUI_SERVER: int
IK_DLS: int
IK_HAS_JOINT_DAMPING: int
IK_HAS_NULL_SPACE_VELOCITY: int
IK_HAS_TARGET_ORIENTATION: int
IK_HAS_TARGET_POSITION: int
IK_SDLS: int
JOINT_FEEDBACK_IN_JOINT_FRAME: int
JOINT_FEEDBACK_IN_WORLD_SPACE: int
JOINT_FIXED: int
JOINT_GEAR: int
JOINT_PLANAR: int
JOINT_POINT2POINT: int
JOINT_PRISMATIC: int
JOINT_REVOLUTE: int
JOINT_SPHERICAL: int
KEY_IS_DOWN: int
KEY_WAS_RELEASED: int
KEY_WAS_TRIGGERED: int
LINK_FRAME: int
MAX_RAY_INTERSECTION_BATCH_SIZE: int
MESH_DATA_SIMULATION_MESH: int
MJCF_COLORS_FROM_FILE: int
PD_CONTROL: int
POSITION_CONTROL: int
PosixFileIO: int
RESET_USE_DEFORMABLE_WORLD: int
RESET_USE_DISCRETE_DYNAMICS_WORLD: int
RESET_USE_REDUCED_DEFORMABLE_WORLD: int
RESET_USE_SIMPLE_BROADPHASE: int
RemoveFileIOAction: int
SENSOR_FORCE_TORQUE: int
SHARED_MEMORY: int
SHARED_MEMORY_GUI: int
SHARED_MEMORY_KEY: int
SHARED_MEMORY_KEY2: int
SHARED_MEMORY_SERVER: int
STABLE_PD_CONTROL: int
STATE_LOGGING_ALL_COMMANDS: int
STATE_LOGGING_CONTACT_POINTS: int
STATE_LOGGING_CUSTOM_TIMER: int
STATE_LOGGING_GENERIC_ROBOT: int
STATE_LOGGING_MINITAUR: int
STATE_LOGGING_PROFILE_TIMINGS: int
STATE_LOGGING_VIDEO_MP4: int
STATE_LOGGING_VR_CONTROLLERS: int
STATE_LOG_JOINT_MOTOR_TORQUES: int
STATE_LOG_JOINT_TORQUES: int
STATE_LOG_JOINT_USER_TORQUES: int
STATE_REPLAY_ALL_COMMANDS: int
TCP: int
TORQUE_CONTROL: int
UDP: int
URDF_ENABLE_CACHED_GRAPHICS_SHAPES: int
URDF_ENABLE_SLEEPING: int
URDF_ENABLE_WAKEUP: int
URDF_GLOBAL_VELOCITIES_MB: int
URDF_GOOGLEY_UNDEFINED_COLORS: int
URDF_IGNORE_COLLISION_SHAPES: int
URDF_IGNORE_VISUAL_SHAPES: int
URDF_INITIALIZE_SAT_FEATURES: int
URDF_MAINTAIN_LINK_ORDER: int
URDF_MERGE_FIXED_LINKS: int
URDF_PRINT_URDF_INFO: int
URDF_USE_IMPLICIT_CYLINDER: int
URDF_USE_INERTIA_FROM_FILE: int
URDF_USE_MATERIAL_COLORS_FROM_MTL: int
URDF_USE_MATERIAL_TRANSPARANCY_FROM_MTL: int
URDF_USE_SELF_COLLISION: int
URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS: int
URDF_USE_SELF_COLLISION_EXCLUDE_PARENT: int
URDF_USE_SELF_COLLISION_INCLUDE_PARENT: int
VELOCITY_CONTROL: int
VISUAL_SHAPE_DATA_TEXTURE_UNIQUE_IDS: int
VISUAL_SHAPE_DOUBLE_SIDED: int
VR_BUTTON_IS_DOWN: int
VR_BUTTON_WAS_RELEASED: int
VR_BUTTON_WAS_TRIGGERED: int
VR_CAMERA_TRACK_OBJECT_ORIENTATION: int
VR_DEVICE_CONTROLLER: int
VR_DEVICE_GENERIC_TRACKER: int
VR_DEVICE_HMD: int
VR_MAX_BUTTONS: int
VR_MAX_CONTROLLERS: int
WORLD_FRAME: int
ZipFileIO: int

class error(Exception): ...

Vec3 = Sequence[float]
Vec4 = Sequence[float]
Mat3 = Sequence[float]

# ----------------------------
# Connection / client
# ----------------------------

@overload
def connect(method: int, key: int = ..., options: str = ...) -> int: ...
@overload
def connect(method: int, hostname: str = ..., port: int = ..., options: str = ...) -> int: ...

def disconnect(physicsClientId: int = ...) -> None: ...
def getConnectionInfo(physicsClientId: int = ...) -> Any: ...
def isConnected(physicsClientId: int = ...) -> bool: ...
def setTimeOut(timeout: float, physicsClientId: int = ...) -> None: ...

# ----------------------------
# Simulation control
# ----------------------------
def setGravity(gravX: float, gravY: float, gravZ: float, physicsClientId: int = ...) -> None: ...
def stepSimulation(physicsClientId: int = ...) -> Any: ...
def performCollisionDetection(physicsClientId: int = ...) -> None: ...
def setRealTimeSimulation(enableRealTimeSimulation: int, physicsClientId: int = ...) -> None: ...
def setTimeStep(timestep: float, physicsClientId: int = ...) -> None: ...
def setPhysicsEngineParameter(*, physicsClientId: int = ..., **kwargs: Any) -> Any: ...  # many keyword options in practice
def resetSimulation(physicsClientId: int = ...) -> None: ...

# ----------------------------
# Loading / saving
# ----------------------------
def loadURDF(
    fileName: str,
    basePosition: Vec3 = ...,
    baseOrientation: Vec4 = ...,
    useMaximalCoordinates: int = ...,
    useFixedBase: int = ...,
    flags: int = ...,
    globalScaling: float = ...,
    physicsClientId: int = ...,
) -> int: ...

def loadSDF(
    fileName: str,
    useMaximalCoordinates: int = ...,
    globalScaling: float = ...,
    physicsClientId: int = ...,
) -> List[int]: ...

def loadMJCF(
    fileName: str,
    useMaximalCoordinates: int = ...,
    globalScaling: float = ...,
    physicsClientId: int = ...,
) -> List[int]: ...

def saveState(physicsClientId: int = ...) -> int: ...
def restoreState(fileName: Optional[str] = ..., stateId: Optional[int] = ..., clientServerId: int = ...) -> None: ...
def removeState(stateUniqueId: int, physicsClientId: int = ...) -> None: ...
def saveBullet(fileName: str, physicsClientId: int = ...) -> None: ...
def saveWorld(filename: str) -> Any: ...

# ----------------------------
# Shapes & bodies
# ----------------------------
def createCollisionShape(
    shapeType: int,
    radius: float = ...,
    halfExtents: Vec3 = ...,
    height: float = ...,
    fileName: str = ...,
    meshScale: Vec3 = ...,
    planeNormal: Vec3 = ...,
    flags: int = ...,
    collisionFramePosition: Vec3 = ...,
    collisionFrameOrientation: Vec4 = ...,
    vertices: Sequence[Vec3] = ...,
    indices: Sequence[int] = ...,
    heightfieldTextureScaling: float = ...,
    numHeightfieldRows: int = ...,
    numHeightfieldColumns: int = ...,
    replaceHeightfieldIndex: int = ...,
    physicsClientId: int = ...,
) -> int: ...

def createCollisionShapeArray(*args: Any, **kwargs: Any) -> List[int]: ...
def removeCollisionShape(collisionShapeUniqueId: int, physicsClientId: int = ...) -> None: ...

def createVisualShape(
    shapeType: int,
    radius: float = ...,
    halfExtents: Vec3 = ...,
    length: float = ...,
    fileName: str = ...,
    meshScale: Vec3 = ...,
    planeNormal: Vec3 = ...,
    flags: int = ...,
    rgbaColor: Sequence[float] = ...,
    specularColor: Vec3 = ...,
    visualFramePosition: Vec3 = ...,
    vertices: Sequence[Vec3] = ...,
    indices: Sequence[int] = ...,
    uvs: Sequence[Sequence[float]] = ...,
    normals: Sequence[Vec3] = ...,
    visualFrameOrientation: Vec4 = ...,
    physicsClientId: int = ...,
) -> int: ...

def createVisualShapeArray(*args: Any, **kwargs: Any) -> List[int]: ...

def createMultiBody(
    baseMass: float = ...,
    baseCollisionShapeIndex: int = ...,
    baseVisualShapeIndex: int = ...,
    basePosition: Vec3 = ...,
    baseOrientation: Vec4 = ...,
    baseInertialFramePosition: Vec3 = ...,
    baseInertialFrameOrientation: Vec4 = ...,
    linkMasses: Sequence[float] = ...,
    linkCollisionShapeIndices: Sequence[int] = ...,
    linkVisualShapeIndices: Sequence[int] = ...,
    linkPositions: Sequence[Vec3] = ...,
    linkOrientations: Sequence[Vec4] = ...,
    linkInertialFramePositions: Sequence[Vec3] = ...,
    linkInertialFrameOrientations: Sequence[Vec4] = ...,
    linkParentIndices: Sequence[int] = ...,
    linkJointTypes: Sequence[int] = ...,
    linkJointAxis: Sequence[Vec3] = ...,
    useMaximalCoordinates: int = ...,
    flags: int = ...,
    batchPositions: Sequence[Vec3] = ...,
    physicsClientId: int = ...,
) -> int: ...

def removeBody(bodyUniqueId: int, physicsClientId: int = ...) -> None: ...
def getNumBodies(physicsClientId: int = ...) -> int: ...
def getBodyUniqueId(serialIndex: int, physicsClientId: int = ...) -> int: ...
def getBodyInfo(bodyUniqueId: int, physicsClientId: int = ...) -> Any: ...
def syncBodyInfo(physicsClientId: int = ...) -> None: ...

# ----------------------------
# Transforms / math helpers
# ----------------------------
def getQuaternionFromEuler(eulerAngle: Vec3, physicsClientId: int = ...) -> Vec4: ...
def getEulerFromQuaternion(quaternion: Vec4, physicsClientId: int = ...) -> Vec3: ...
def getMatrixFromQuaternion(quaternion: Vec4, physicsClientId: int = ...) -> List[float]: ...
def getAxisAngleFromQuaternion(quaternion: Vec4, physicsClientId: int = ...) -> Tuple[Vec3, float]: ...
def invertTransform(position: Vec3, orientation: Vec4) -> Tuple[Vec3, Vec4]: ...
def multiplyTransforms(positionA: Vec3, orientationA: Vec4, positionB: Vec3, orientationB: Vec4, physicsClientId: int = ...) -> Tuple[Vec3, Vec4]: ...
def getDifferenceQuaternion(quaternionStart: Vec4, quaternionEnd: Vec4, physicsClientId: int = ...) -> Vec4: ...
def getAPIVersion(physicsClientId: int = ...) -> int: ...
def rotateVector(quaternion: Vec4, vector: Vec3) -> Vec3: ...

# ----------------------------
# Base pose/velocity
# ----------------------------
def getBasePositionAndOrientation(objectUniqueId: int, physicsClientId: int = ...) -> Tuple[Vec3, Vec4]: ...
def resetBasePositionAndOrientation(bodyUniqueId: int, posObj: Vec3, ornObj: Vec4, physicsClientId: int = ...) -> None: ...
def getBaseVelocity(bodyUniqueId: int, physicsClientId: int = ...) -> Tuple[Vec3, Vec3]: ...
def resetBaseVelocity(objectUniqueId: int, linearVelocity: Vec3 = ..., angularVelocity: Vec3 = ..., physicsClientId: int = ...) -> None: ...

# ----------------------------
# Robot structure & joint IO
# ----------------------------
def getNumJoints(bodyUniqueId: int, physicsClientId: int = ...) -> int: ...
def getJointInfo(bodyUniqueId: int, jointIndex: int, physicsClientId: int = ...) -> Any: ...

def setJointMotorControl2(
    bodyUniqueId: int,
    jointIndex: int,
    controlMode: int,
    targetPosition: float = ...,
    targetVelocity: float = ...,
    force: float = ...,
    positionGain: float = ...,
    velocityGain: float = ...,
    maxVelocity: float = ...,
    physicsClientId: int = ...,
) -> None: ...

def setJointMotorControlArray(
    bodyUniqueId: int,
    jointIndices: Sequence[int],
    controlMode: int,
    targetPositions: Sequence[float] = ...,
    targetVelocities: Sequence[float] = ...,
    forces: Sequence[float] = ...,
    positionGains: Sequence[float] = ...,
    velocityGains: Sequence[float] = ...,
    physicsClientId: int = ...,
) -> None: ...

def setJointMotorControlMultiDof(
    bodyUniqueId: int,
    jointIndex: int,
    controlMode: int,
    targetPosition: Sequence[float] = ...,
    targetVelocity: Sequence[float] = ...,
    force: Sequence[float] = ...,
    positionGain: float = ...,
    velocityGain: float = ...,
    maxVelocity: float = ...,
    physicsClientId: int = ...,
) -> None: ...

def setJointMotorControlMultiDofArray(
    bodyUniqueId: int,
    jointIndices: Sequence[int],
    controlMode: int,
    targetPositions: Sequence[Sequence[float]] = ...,
    targetVelocities: Sequence[Sequence[float]] = ...,
    forces: Sequence[Sequence[float]] = ...,
    positionGains: Sequence[float] = ...,
    velocityGains: Sequence[float] = ...,
    maxVelocities: Sequence[float] = ...,
    physicsClientId: int = ...,
) -> None: ...

def getJointState(bodyUniqueId: int, jointIndex: int, physicsClientId: int = ...) -> Any: ...
def getJointStates(bodyUniqueId: int, jointIndices: Sequence[int], physicsClientId: int = ...) -> Any: ...
def getJointStateMultiDof(bodyUniqueId: int, jointIndex: int, physicsClientId: int = ...) -> Any: ...
def getJointStatesMultiDof(bodyUniqueId: int, jointIndices: Sequence[int], physicsClientId: int = ...) -> Any: ...
def resetJointState(objectUniqueId: int, jointIndex: int, targetValue: float, targetVelocity: float = ..., physicsClientId: int = ...) -> None: ...
def resetJointStateMultiDof(objectUniqueId: int, jointIndex: int, targetValue: Sequence[float], targetVelocity: Sequence[float] = ..., physicsClientId: int = ...) -> None: ...
def resetJointStatesMultiDof(objectUniqueId: int, jointIndices: Sequence[int], targetValues: Sequence[Sequence[float]], targetVelocities: Sequence[Sequence[float]] = ..., physicsClientId: int = ...) -> None: ...
def enableJointForceTorqueSensor(bodyUniqueId: int, jointIndex: int, enableSensor: int = ..., physicsClientId: int = ...) -> None: ...

# ----------------------------
# Links
# ----------------------------
def getLinkState(objectUniqueId: int, linkIndex: int, computeLinkVelocity: int = ..., computeForwardKinematics: int = ..., physicsClientId: int = ...) -> Any: ...
def getLinkStates(objectUniqueId: int, linkIndices: Sequence[int], computeLinkVelocity: int = ..., computeForwardKinematics: int = ..., physicsClientId: int = ...) -> Any: ...

# ----------------------------
# Forces / contacts / rays
# ----------------------------
def applyExternalForce(objectUniqueId: int, linkIndex: int, forceObj: Vec3, posObj: Vec3, flags: int, physicsClientId: int = ...) -> None: ...
def applyExternalTorque(objectUniqueId: int, linkIndex: int, torqueObj: Vec3, flags: int, physicsClientId: int = ...) -> None: ...
def getContactPoints(*args: Any, **kwargs: Any) -> Any: ...
def getClosestPoints(*args: Any, **kwargs: Any) -> Any: ...
def getAABB(bodyUniqueId: int, linkIndex: int = ..., physicsClientId: int = ...) -> Tuple[Vec3, Vec3]: ...
def getOverlappingObjects(aabbMin: Vec3, aabbMax: Vec3, physicsClientId: int = ...) -> Any: ...
def rayTest(rayFromPosition: Vec3, rayToPosition: Vec3, physicsClientId: int = ...) -> Any: ...
def rayTestBatch(rayFromPositions: Sequence[Vec3], rayToPositions: Sequence[Vec3], physicsClientId: int = ...) -> Any: ...

# ----------------------------
# Constraints
# ----------------------------
def createConstraint(
    parentBodyUniqueId: int,
    parentLinkIndex: int,
    childBodyUniqueId: int,
    childLinkIndex: int,
    jointType: int,
    jointAxis: Vec3,
    parentFramePosition: Vec3,
    childFramePosition: Vec3,
    parentFrameOrientation: Vec4 = ...,
    childFrameOrientation: Vec4 = ...,
    physicsClientId: int = ...,
) -> int: ...

def changeConstraint(
    userConstraintUniqueId: int,
    *,
    jointChildPivot: Optional[Vec3] = ...,
    jointChildFrameOrientation: Optional[Vec4] = ...,
    maxForce: Optional[float] = ...,
    gearRatio: Optional[float] = ...,
    gearAuxLink: Optional[int] = ...,
    relativePositionTarget: Optional[float] = ...,
    erp: Optional[float] = ...,
    physicsClientId: Optional[int] = ...,
) -> None: ...

def removeConstraint(userConstraintUniqueId: int, physicsClientId: int = ...) -> None: ...
def getNumConstraints(physicsClientId: int = ...) -> int: ...
def getConstraintUniqueId(serialIndex: int, physicsClientId: int = ...) -> int: ...
def getConstraintInfo(constraintUniqueId: int, physicsClientId: int = ...) -> Any: ...
def getConstraintState(constraintUniqueId: int, physicsClientId: int = ...) -> Any: ...

# ----------------------------
# Dynamics / visual
# ----------------------------
def changeDynamics(bodyUniqueId: int, linkIndex: int, *,
                   mass: Optional[float] = ...,
                   lateralFriction: Optional[float] = ...,
                   localInertiaDiagonal: Optional[Vec3] = ...,
                   restitution: Optional[float] = ...,
                   rollingFriction: Optional[float] = ...,
                   spinningFriction: Optional[float] = ...,
                   contactStiffness: Optional[float] = ...,
                   contactDamping: Optional[float] = ...,
                   frictionAnchor: Optional[int] = ...,
                   linearDamping: Optional[float] = ...,
                   angularDamping: Optional[float] = ...,
                   gravity: Optional[Vec3] = ...,
                   physicsClientId: int = ...) -> None: ...

def getDynamicsInfo(bodyUniqueId: int, linkIndex: int, physicsClientId: int = ...) -> Any: ...
def changeVisualShape(objectUniqueId: int, linkIndex: int, *,
                      rgbaColor: Optional[Sequence[float]] = ...,
                      textureUniqueId: Optional[int] = ...,
                      physicsClientId: int = ...) -> None: ...
def loadTexture(fileName: str, physicsClientId: int = ...) -> int: ...
def getVisualShapeData(objectUniqueId: int, physicsClientId: int = ...) -> Any: ...

# ----------------------------
# Cameras
# ----------------------------
def computeViewMatrix(eyePosition: Vec3, targetPosition: Vec3, upVector: Vec3) -> List[float]: ...
def computeViewMatrixFromYawPitchRoll(cameraTargetPosition: Vec3, distance: float, yaw: float, pitch: float, roll: float, upAxisIndex: int = ..., physicsClientId: int = ...) -> List[float]: ...
def computeProjectionMatrix(left: float, right: float, bottom: float, top: float, nearVal: float, farVal: float) -> List[float]: ...
def computeProjectionMatrixFOV(fov: float, aspect: float, nearVal: float, farVal: float) -> List[float]: ...
def getCameraImage(width: int, height: int, viewMatrix: Sequence[float] = ..., projectionMatrix: Sequence[float] = ..., renderer: int = ..., flags: int = ..., lightDirection: Vec3 = ..., lightColor: Vec3 = ..., physicsClientId: int = ...) -> Any: ...
def getDebugVisualizerCamera(physicsClientId: int = ...) -> Any: ...
def resetDebugVisualizerCamera(cameraDistance: float, cameraYaw: float, cameraPitch: float, cameraTargetPosition: Vec3, physicsClientId: int = ...) -> None: ...

# ----------------------------
# Debug GUI / user data
# ----------------------------
def addUserDebugLine(fromXYZ: Vec3, toXYZ: Vec3, colorRGB: Vec3 = ..., lifeTime: float = ..., lineWidth: float = ..., physicsClientId: int = ...) -> int: ...
def addUserDebugText(text: str, textPosition: Vec3, textColorRGB: Vec3 = ..., textSize: float = ..., lifeTime: float = ..., physicsClientId: int = ...) -> int: ...
def addUserDebugParameter(paramName: str, rangeMin: float, rangeMax: float, startValue: float) -> int: ...
def readUserDebugParameter(itemUniqueId: int) -> float: ...
def removeUserDebugItem(itemUniqueId: int, physicsClientId: int = ...) -> None: ...
def removeAllUserDebugItems(physicsClientId: int = ...) -> None: ...
def configureDebugVisualizer(flag: int, enable: int = ..., physicsClientId: int = ...) -> None: ...
def addUserData(bodyUniqueId: int, key: str, value: Any, linkIndex: int = ..., visualShapeIndex: int = ..., physicsClientId: int = ...) -> Any: ...
def getUserData(userDataId: int, physicsClientId: int = ...) -> Any: ...
def getUserDataId(bodyUniqueId: int, key: str, linkIndex: int = ..., visualShapeIndex: int = ..., physicsClientId: int = ...) -> Any: ...
def getNumUserData(bodyUniqueId: int, physicsClientId: int = ...) -> Any: ...
def getUserDataInfo(bodyUniqueId: int, userDataIndex: int, physicsClientId: int = ...) -> Any: ...
def removeUserData(userDataId: int, physicsClientId: int = ...) -> Any: ...

# ----------------------------
# IK / dynamics math (high-level signatures)
# ----------------------------
def calculateInverseKinematics(bodyUniqueId: int, endEffectorLinkIndex: int, targetPosition: Vec3, targetOrientation: Optional[Vec4] = ..., lowerLimits: Optional[Sequence[float]] = ..., upperLimits: Optional[Sequence[float]] = ..., jointRanges: Optional[Sequence[float]] = ..., restPoses: Optional[Sequence[float]] = ..., physicsClientId: int = ...) -> List[float]: ...
def calculateInverseKinematics2(*args: Any, **kwargs: Any) -> Any: ...
def calculateInverseDynamics(bodyUniqueId: int, objPositions: Sequence[float], objVelocities: Sequence[float], objAccelerations: Sequence[float], physicsClientId: int = ...) -> List[float]: ...
def calculateJacobian(bodyUniqueId: int, linkIndex: int, localPosition: Vec3, objPositions: Sequence[float], objVelocities: Sequence[float], objAccelerations: Sequence[float], physicsClientId: int = ...) -> Any: ...
def calculateMassMatrix(bodyUniqueId: int, objPositions: Sequence[float], physicsClientId: int = ...) -> Any: ...

# ----------------------------
# Logging
# ----------------------------
def startStateLogging(loggingType: int, fileName: Optional[str] = ..., objectUniqueId: Optional[int] = ..., physicsClientId: int = ...) -> int: ...
def stopStateLogging(loggingUniqueId: int, physicsClientId: int = ...) -> None: ...

# ----------------------------
# Misc retained from your list (left variadic due to lack of precise public signature in guide)
# ----------------------------
def changeTexture(*args: Any, **kwargs: Any): ...
def renderImage(*args: Any, **kwargs: Any): ...
def setInternalSimFlags(*args: Any, **kwargs: Any): ...
def setJointMotorControl(*args: Any, **kwargs: Any): ...
def setVRCameraState(*args: Any, **kwargs: Any): ...
def getVREvents(*args: Any, **kwargs: Any): ...
def getKeyboardEvents(*args: Any, **kwargs: Any): ...
def getMouseEvents(*args: Any, **kwargs: Any): ...
def getCollisionShapeData(*args: Any, **kwargs: Any): ...
def getMeshData(*args: Any, **kwargs: Any): ...
def loadBullet(*args: Any, **kwargs: Any): ...
def loadSoftBody(*args: Any, **kwargs: Any): ...
def createSoftBodyAnchor(*args: Any, **kwargs: Any): ...
def getTetraMeshData(*args: Any, **kwargs: Any): ...
def vhacd(*args: Any, **kwargs: Any): ...
def executePluginCommand(*args: Any, **kwargs: Any): ...
def loadPlugin(*args: Any, **kwargs: Any): ...
def unloadPlugin(*args: Any, **kwargs: Any): ...
def setAdditionalSearchPath(*args, **kwargs): ...

